using System;

namespace GPUAnimationLib.Runtime
{
    public class CompletedAction
    {
        public bool Valid;
        public Action Callback;
        public float Delay;

        public void Execute()
        {
            if (Valid && Callback != null)
            {
                var cb = Callback;
                Callback = null;
                Valid = false;
                cb();
            }
        }
    }
}